<section>
    <div class="panel panel-success">
        <div class="panel-heading modal-header" align="center">
            <h3 class="modal-title" id="updateModelLabel">订单详情</h3>
        </div>

        <div class="modal-body panel-body ">
            <div class="col-md-offset-3 ">

                <h6>
                    <label>订单编号&nbsp;&nbsp;</label>
                    <label id="orderInfoId">{{order._id}}</label>
                </h6>

                <h6>
                    <label>商家名&nbsp;&nbsp;</label>
                    <label id="customerName">{{order.merchant.username}}</label>
                </h6>
                <h6>
                    <label>下单日期&nbsp;&nbsp;</label>
                    <label>{{order.createDate| date:'yyyy-MM-dd hh:mm:ss'}}</label>
                </h6>
                <h6>
                    <label>订单内容&nbsp;&nbsp;</label><br>
                    <table class="col-md-offset-3" ng-repeat="food in order.foods">
                        <tr>
                            <td>{{food.food.name}}&nbsp;&nbsp;&nbsp;&nbsp;×{{food.num}}</td>
                        </tr>
                    </table>
                </h6>
                <h6>
                    <label>订单总额&nbsp;&nbsp;</label>
                    <label>{{order.allTotalMoney}}&nbsp;&nbsp;元</label>
                </h6>
                <h6>
                    <label>订单电话&nbsp;&nbsp;</label>
                    <label>{{order.phone}}</label>
                </h6>
                <h6>
                    <label>订单地址&nbsp;&nbsp;</label>
                    <label>{{order.address}}</label>
                </h6>
                <h6>
                    <label>订单状态&nbsp;&nbsp;</label>
                    <label>{{order.status}}</label>
                </h6>
                <div ng-switch on="order.status" >
                    <div ng-switch-when="正在配送">
                        <div><label>自动确认：</label>&nbsp;&nbsp;&nbsp;&nbsp;{{now| date:'mm:ss'}}</div>
                    </div>
                </div>
            </div>
        </div>


        <div class=" panel-heading modal-footer">
            <div ng-switch on="order.status">
                <div ng-switch-when="等待商家接单">
                    <button type="submit" class="btn btn-warning" name="button1" ng-click="cancelOrder(order.status)">取消订单</button>
                </div>
                <div ng-switch-when="订单完成">
                    <button class="btn btn-warning" ng-click="">投诉</button>
                </div>
            </div>
            <button class="btn btn-default" data-dismiss="modal" ng-click="cancel()">返回</button>
        </div>
    </div>
</section>